Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes DOCS-1656
Problem
Nothing measures whether the send email hook guide leads an agent to a hook that delivers working Auth emails. A team routes all mail through its own outbox. Auth's sign-up and password reset emails skip it. With a hook in place, two things go wrong: Auth's database role cannot write to a table with row level security, so sign-up fails, or the email's button points at the wrong URL.
Evidence:
redirect_toorsite_urlis the app destination for links.site_urlis the Supabase project URL and not the configured SiteUrl supabase#36565: in the hook payload,email_data.site_urlis the Supabase project URL, not the configured Site URL. The local stack confirms it.tokeninstead oftoken_hash, so it did not work.No existing eval covers the send email hook.
build-docs-009covers the custom access token hook, andbuild-docs-021follows the standard sign-up email.Sources reached: Linear, Slack, agent-skills and supabase/supabase issues. Not reached: Hex, Supacademy.
Changes
Adds
build-docs-041-send-email-hook. A bookshop sends every email through an outbox table that a worker drains. The prompt asks for the sign-up and reset emails to land in the outbox, finished, with buttons that work, and for the outbox to stay closed to app users. The eval uses a Postgres function hook, the design the page's SQL tab shows. The seed's outbox has row level security on and no policies, which matches the Table Editor and Security Advisor defaults. A hook that writes to it needs a rule for Auth's database role.The scorer restarts the stack, signs a person up and requests a reset for another, and follows the links in the outbox rows. It follows links on local hosts only.
Checks:
Expected signal: The page's SQL example grants the table to Auth's role, but its table has no row level security. Against the seeded outbox, Auth's insert is refused and sign-up fails. A link built on the page's hardcoded project URL, or one that drops
redirect_to, fails the button checks.What part of the guide this tests:
userandemail_datatoken_hash,site_urlandredirect_toVerification
pnpm exec biome check evals/docs/build-docs-041-send-email-hookpasses.pnpm --filter @supabase-evals/framework typecheckpasses.pnpm eval:dry -- --suite docs --eval build-docs-041-send-email-hookplans one pair oncodex-gpt-6-luna-no-skills.codex-gpt-6-luna-no-skillsin therun-evals-changedrun. All three passed all seven checks, including the guide read. A full-marks pass does not show the page carried the run. Braintrust run.For new or changed evals (see Submitting evals for review):
run-evals-changedlabel or the Refresh eval results workflow (suite: regressionfor framework changes), and linked the Braintrust run here.